/*  
 * @(#) MyTokenInterceptor.java Create on 2012-5-8 下午12:28:20   
 *   
 * Copyright 2012 by xl.   
 */

package cn.com.common.interceptor;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

/**
 * 
 * @author zhanghongliang
 * @date 2012-5-8
 */
@Controller
public class MyTokenInterceptor implements Interceptor {
	private Logger log = Logger.getLogger(MyTokenInterceptor.class);
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public void destroy() {
		if (log.isDebugEnabled())
			log.debug("MyTokenInterceptor destroy...");
	}

	@Override
	public void init() {
		if (log.isDebugEnabled())
			log.debug("MyTokenInterceptor init...");
	}

	@Override
	public String intercept(ActionInvocation aic) throws Exception {
		log.info("MyTokenInterceptor ....");
		return aic.invoke();
	}
}
